import Layout from "/@/layout/index.vue";
import LayoutEx from "/@/layout/index-ex.vue";

const remainingRouter = [
  {
    path: "/login",
    name: "login",
    component: () => import("/@/views/login.vue"),
    meta: {
      title: "message.hslogin",
      showLink: false,
      rank: 101
    }
  },
  {
    path: "/escape/login",
    name: "escapelogin",
    component: () => import("/@/views/login.vue"),
    meta: {
      title: "message.hslogin",
      showLink: false,
      rank: 101
    }
  },
  {
    path: "/register",
    name: "register",
    component: () => import("/@/views/register.vue"),
    meta: {
      title: "message.hsregister",
      showLink: false,
      rank: 102
    }
  },
  {
    path: "/logout",
    name: "logout",
    component: () => import("/@/views/logout.vue"),
    meta: {
      title: "",
      showLink: false,
      rank: 102
    }
  },
  // {
  //   // 找不到路由重定向到404页面
  //   path: "/:pathMatch(.*)",
  //   name: "pathMatch",
  //   component: Layout,
  //   redirect: "/error/404",
  //   meta: {
  //     icon: "el-icon-s-home",
  //     title: "message.hshome",
  //     showLink: false,
  //     savedPosition: false,
  //     rank: 103,
  //   },
  // },
  {
    path: "/redirect",
    name: "redirect",
    component: Layout,
    meta: {
      icon: "el-icon-s-home",
      title: "message.hshome",
      showLink: false,
      savedPosition: false,
      rank: 104
    },
    children: [
      {
        path: "/redirect/:path(.*)",
        name: "redirect",
        component: () => import("/@/views/redirect.vue")
      }
    ]
  },
  {
    path: "/profile",
    name: "profile",
    // component: Layout,
    component: LayoutEx,
    // component: () => import("/@/views/profile.vue"),
    meta: {
      title: "message.profile",
      showLink: false
    },
    children: [
      {
        path: "/profile",
        name: "personal",
        component: () => import("/@/views/profile.vue")
      }
    ]
  },
  {
    path: "/notification",
    name: "notification",
    component: LayoutEx,
    // component: () => import("/@/views/notification.vue"),
    meta: {
      title: "message.notification",
      showLink: false
    },
    children: [
      {
        path: "/notification",
        name: "notifications",
        component: () => import("/@/views/notification.vue")
      }
    ]
  },
  {
    path: "/systems",
    name: "systems",
    component: LayoutEx,
    redirect: "/menus",
    meta: {
      title: "",
      showLink: false,
      rank: 102
    },
    children: [
      {
        path: "/menus",
        name: "menus",
        component: () => import("/@/views/system/menu/index.vue")
      },
      {
        path: "/roles",
        name: "roles",
        component: () => import("/@/views/system/role/index.vue")
      },
      {
        path: "/resources",
        name: "resources",
        component: () => import("/@/views/system/resource/index.vue")
      }
    ]
  },
  {
    path: "/preview",
    name: "preview",
    component: () => import("/@/views/preview.vue"),
    meta: {
      title: "message.preview",
      showLink: false
    }
  },
  {
    path: "/preview3D",
    name: "preview3D",
    component: () => import("/@/views/preview3D.vue"),
    meta: {
      showLink: false
    }
  }
  // {
  //   path: "/analysis",
  //   name: "analysis",
  //   component: Layout,
  //   meta: {
  //     icon: "el-icon-position",
  //     title: "系统分析",
  //     showLink: true,
  //     savedPosition: false,
  //     rank: 10000
  //   },
  //   children: [
  //     {
  //       path: "/analysis",
  //       name: "analysisManage",
  //       component: () => import("/@/views/analysis/index.vue")
  //     }
  //   ]
  // }
];

export default remainingRouter;
